import { Result } from './common';

export interface UploadNormalFileStreamParams {
  name: string;
  parentId: string;
  length: number;
}

export interface FileItemsPolicyParams {
  name: string;
  parentId?: string;
  parentPath?: string;
  sourceId?: string;
  maxLength?: number;
}

interface FileItemStatus {
  fileItemId: string;
  fileItemName: string;
  name: string;
  failedReason: string;
  status: string;
}

interface Policy {
  accessId: string;
  signature: string;
  objectKey: string;
  expire: number;
  host: string;
  callbackBody: string;
  policy: string;
}

export interface FileItemsStatusModel extends Result {
  data: FileItemStatus;
}

export interface DownloadSourceFileModel extends Result {
  data: string;
}

export interface FileItemPathModel extends Result {
  data: string;
}

export interface RemoveFileItmesModel extends Result {
  data: string;
}

export interface PolicyModel extends Result {
  data: Policy;
}
